package com.bub.pay.framework.common.constant;

import org.apache.shiro.subject.support.DelegatingSubject;

public class SystemConstants {

    /**
     * 商户正常状态
     */
    public static final int MERCHANT_NORMAL_STATE = 1;

    /**
     * 商户支付秘钥类型
     */
    public static final int MERCHANT_TYPE_PAY_KEY = 1;

    /**
     * 商户代付秘钥类型
     */
    public static final int MERCHANT_TYPE_REMIT_KEY = 2;

    /**
     * UTF-8编码
     */
    public static final String DEFAULT_CODE = "UTF-8";

    /**
     * 默认日期格式化格式
     */
    public static final String DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss";

    /**
     * 默认日期格式化格式
     */
    public static final String DAY_DEFAULT_FORMAT = "yyyy-MM-dd";

    /**
     * 代付银行卡日限额
     */
    public static final String REMIT_BANK_DAY_LIMIT_AMOUNT = "REMIT_BANK_DAY_LIMIT_AMOUNT";

    /**
     * session中用户信息
     */
    public static final String USER_INFO = "userInfo";

    // 用户类型，1=商户，2=代理，3=管理平台，4=分销商后台
    public static final int SYS_TYPE_DISTRIBUTOR = 4;
    public static final int SYS_TYPE_ADMIN = 3;
    public static final int SYS_TYPE_AGENT = 2;
    public static final int SYS_TYPE_MERCHANT = 1;

    public static final String SESSION_KEY = "currentSimpleSession";

    public static final String RUN_AS_PRINCIPALS_SESSION_KEY =
            DelegatingSubject.class.getName() + ".RUN_AS_PRINCIPALS_SESSION_KEY";

    // 一天的秒数据
    public static final int ONE_DAY_SECOND = 24 * 60 * 60;

    // 校验大陆IP标识
    public static final String CHINA_IP_SWITH = "CHINA_IP_SWITH";

    // 外网正向代理标识
    public static final String PROXY_HOST_IP_PORT = "PROXY_HOST_IP_PORT";

    // 大陆IP校验禁用
    public static final String CHINA_IP_VALID_FORBIDDEN = "2";

    // 大陆IP校验开启
    public static final String CHINA_IP_VALID_OPEN = "1";
}
